// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

import Swiper from 'swiper'
import 'swiper/src/swiper.less'

function initpage() {
    var view_width = document.getElementsByTagName('html')[0].getBoundingClientRect().width
    var fr_html = document.getElementsByTagName('html')[0]
    view_width > 320 ? fr_html.style.fontSize = view_width / 320 * 16 + 'px' : fr_html.style.fontSize = 16 + 'px'
}
initpage()
window.onresize = function() {
    initpage()
}

/*swiper*/
var swiper = new Swiper('.swiper-container', {
    pagination: '.swiper-pagination',
    paginationClickable: true,
    direction: 'vertical',

    nextButton: '.swiper-button-next',
    prevButton: '.swiper-button-prev'
})

Vue.config.productionTip = false

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: { App }
})
